<!--
 * @Description: 呼吸灯-过渡
 * @Author: rendc
 * @Date: 2025-09-19 10:09:42
 * @LastEditors: rendc
 * @LastEditTime: 2025-09-19 11:13:37
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>呼吸灯</title>
  <style>
    .square,
    .outer,
    .inner {
      border: 1px solid red;
      /* 更改盒子模型 */
      box-sizing: border-box;
    }

    .square {
      width: 300px;
      height: 300px;
      margin: 0 auto;
      padding: 50px;
    }

    .outer {
      /* width: 200px;
      height: 200px; */
      width: 100%;
      height: 100%;
      border-radius: 50%;
      /* margin: 0 auto; */
      padding: 25px;
      border: 5px solid red;
    }

    .inner {
      /* width: 150px;
      height: 150px; */
      width: 100%;
      height: 100%;
      border-radius: 50%;
      border: 5px solid red;
      /* margin: 0 auto; */
    }

    /* 光标悬浮触发 */
    .inner:hover,
    .outer:hover {
      /* 1.1必须要有属性发⽣变化  */
      border-color: greenyellow;
      /* 1.2必须告诉系统哪个属性需要执⾏过渡效果  */
      /* transition-property: border-color; */
      /* 1.3必须告诉系统过渡效果持续时⻓ */
      /* transition-duration: 5s; */
      /* 速写 */
      transition: border-color 3s;
    }

    /* 光标悬浮在方框上 圆变大 */
    .square:hover {
      padding: 25px;
      transition: padding 3s;
    }
  </style>
</head>

<body>
  <div class="square">
    <div class="outer">
      <div class="inner"></div>
    </div>
  </div>
</body>

</html>